import java.util.List;

import multimedia.MultimediaTO;
import multimedia.XMLMultimediaDAO;
import fachadaImagen.delegate.ImagenFacadeDelegate;

public class TestMultimedia {
	

	public void registrarMultimediaTest(){
	
		MultimediaTO multimedia = new MultimediaTO("prueba", "messi.png");
		ImagenFacadeDelegate dao = new ImagenFacadeDelegate();
		dao.registrarImagen(multimedia);
		
	}
	
	public void buscarPorNombreTest(){
		
		XMLMultimediaDAO dao = new XMLMultimediaDAO();
		MultimediaTO multimedia = dao.buscarPorNombre("messi.png", "imagen");
		System.out.println(multimedia.getPath());
	}	
	
	public void buscarMultimediaTest(){
		XMLMultimediaDAO dao = new XMLMultimediaDAO();
		List<MultimediaTO> lista;
		lista = dao.buscarMultimedia("sonidos mec", "sonido");
		for(int i=0; i<lista.size(); i++) System.out.println(lista.get(i).getPath());
	}
	
	public void eliminarMultimediaTest(){
		XMLMultimediaDAO dao = new XMLMultimediaDAO();
		dao.eliminarMultimedia("messi.png", "imagen");
	}
	
	public void editarMultimediaTest(){
		XMLMultimediaDAO dao = new XMLMultimediaDAO();
		dao.editarMultimedia("messi.png", "saltan, iniesta, xavi", "imagen");
	}
	
	public static void main(String[] args){
		//new TestMultimedia().registrarMultimediaTest();
		//new TestMultimedia().buscarPorNombreTest();
		//new TestMultimedia().buscarMultimediaTest();
		//new TestMultimedia().eliminarMultimediaTest();
		new TestMultimedia().editarMultimediaTest();
	}
}
